/*
 * 作者：姚俊
 * 功能：论著统计的action
 * 日期：2015-05-24
 */
package admin.action.statistics;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import teacher.bean.Teacher;
import leader.service.LeaderService;
import admin.service.member.LeaderServiceAdmin;;

public class TreatiseStatisticsAction {
	
	
	List<Map<Integer,Integer>> counts=new ArrayList<Map<Integer,Integer>>();

	public List<Map<Integer, Integer>> getCounts() {
		return counts;
	}
	public void setCounts(List<Map<Integer, Integer>> counts) {
		this.counts = counts;
	}
	
		public String execute()
	
	{
		LeaderServiceAdmin ls = new LeaderServiceAdmin();
		for(int i=0;i<4;i++)
		{		
				Map map=new HashMap();
				Teacher tea = new Teacher();
				tea.setDirection(i);
			
				for(int j=1;j<5;j++)
			{
				
				
				
				map.put(j,ls.getCountOfTreatiseClass(j-1,tea));
			}
				
				Teacher tea0 = new Teacher();
				tea0.setDirection(i);
				map.put(5, ls.getCountOfDirectTreatise(tea0));
				map.put(0, i);	
				counts.add(map);
				
		}
	
		return "succ";
	}
	

}
